package com.example.myshortcutdemo.lifecycle

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.util.Log
import androidx.databinding.DataBindingUtil
import androidx.lifecycle.LifecycleObserver
import com.example.myshortcutdemo.R
import com.example.myshortcutdemo.databinding.ActivityTestLifecycleMainBinding


class LifecycleTestActivity : AppCompatActivity() {
    private lateinit var mBind :ActivityTestLifecycleMainBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mBind =  DataBindingUtil.setContentView(
            this,
            R.layout.activity_test_lifecycle_main
        )

        Log.d("自定义的", "onCreate: LifecycleTestActivity")

        lifecycle.addObserver(object :LifecycleObserver{

        })
    }

    override fun onStart() {
        super.onStart()
    }

    override fun onRestart() {
        super.onRestart()
    }
}